@<template>
  <nav-bar >
      <div class="mid_bar"  slot="mid_bar">
          <span>购物车({{count}})</span>
          
      </div>
   
  
  </nav-bar>
</template>

<script>

import NavBar from 'components/common/navbar/NavBar'
//从vuex导出 getter方法
import { mapGetters } from 'vuex'

export default {
    components: {
        NavBar,
        
    },
    computed : {
        // Count() {
        //     return this.$store.getters.getCount
        // }

        //直接获取getters中的方法
        ...mapGetters(["count"])
    },
    mounted(){
        
    }

}
</script>

<style scoped>
.mid_bar {
    line-height: 44px;
    color: #fff;
    background-color: var(--color-tint);
}
</style>